if (FALSE) {
file <- system.file("external/ndvi", package="rts")
ndvi <- rts(file) # read the ndvi time series from the specified file
n1 <- ndvi[125] # extract the time series values at cell number 125 for all available times
n1
plot(n1)
n2 <- ndvi[125,"/20090101"] # extract the time series values at cell number 125 for
# all times after 2009-01-01
n2
plot(n2)
n3 <- ndvi[125,"200901/"] # extract the time series values at cell number 125 for all
# times before 2009-01
n4 <- ndvi[10:20,"2008-05-01"] #extract the values at cell numbers of 10:20 for
# the specified time
n4
}
Run the code above in your browser using DataLab